load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "apiservices.go",
        "crds.go",
        "daemonsets.go",
        "deployments.go",
        "instancetypes.go",
        "networkpolicy.go",
        "prometheus.go",
        "routes.go",
        "scc.go",
        "secrets.go",
        "serviceaccountnames.go",
        "validatingadmissionpolicy.go",
        "validations_generated.go",
        "webhooks.go",
    ],
    embedsrcs = [
        "data/common-clusterinstancetypes-bundle.yaml",
        "data/common-clusterpreferences-bundle.yaml",
    ],
    importpath = "kubevirt.io/kubevirt/pkg/virt-operator/resource/generate/components",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/certificates/bootstrap:go_default_library",
        "//pkg/certificates/triple:go_default_library",
        "//pkg/certificates/triple/cert:go_default_library",
        "//pkg/pointer:go_default_library",
        "//pkg/storage/reservation:go_default_library",
        "//pkg/util:go_default_library",
        "//pkg/virt-operator/resource/placement:go_default_library",
        "//pkg/virt-operator/util:go_default_library",
        "//staging/src/kubevirt.io/api/clone:go_default_library",
        "//staging/src/kubevirt.io/api/clone/v1alpha1:go_default_library",
        "//staging/src/kubevirt.io/api/clone/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/core:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/api/export/v1alpha1:go_default_library",
        "//staging/src/kubevirt.io/api/export/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/instancetype:go_default_library",
        "//staging/src/kubevirt.io/api/instancetype/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/migrations:go_default_library",
        "//staging/src/kubevirt.io/api/migrations/v1alpha1:go_default_library",
        "//staging/src/kubevirt.io/api/pool/v1alpha1:go_default_library",
        "//staging/src/kubevirt.io/api/pool/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/snapshot/v1alpha1:go_default_library",
        "//staging/src/kubevirt.io/api/snapshot/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/client-go/log:go_default_library",
        "//vendor/github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1:go_default_library",
        "//vendor/github.com/openshift/api/route/v1:go_default_library",
        "//vendor/github.com/openshift/api/security/v1:go_default_library",
        "//vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring:go_default_library",
        "//vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1:go_default_library",
        "//vendor/k8s.io/api/admissionregistration/v1:go_default_library",
        "//vendor/k8s.io/api/apps/v1:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/api/networking/v1:go_default_library",
        "//vendor/k8s.io/api/policy/v1:go_default_library",
        "//vendor/k8s.io/api/scheduling/v1:go_default_library",
        "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/yaml:go_default_library",
        "//vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "apiservices_test.go",
        "components_suite_test.go",
        "crds_test.go",
        "deployments_test.go",
        "instancetypes_test.go",
        "routes_test.go",
        "scc_test.go",
        "secrets_test.go",
        "validatingadmissionpolicy_test.go",
        "webhooks_test.go",
    ],
    embed = [":go_default_library"],
    race = "on",
    deps = [
        "//pkg/certificates/bootstrap:go_default_library",
        "//pkg/certificates/triple/cert:go_default_library",
        "//pkg/pointer:go_default_library",
        "//staging/src/kubevirt.io/api/clone/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/core/v1:go_default_library",
        "//staging/src/kubevirt.io/api/export/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/pool/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/api/snapshot/v1beta1:go_default_library",
        "//staging/src/kubevirt.io/client-go/testutils:go_default_library",
        "//vendor/github.com/onsi/ginkgo/v2:go_default_library",
        "//vendor/github.com/onsi/gomega:go_default_library",
        "//vendor/github.com/openshift/api/route/v1:go_default_library",
        "//vendor/github.com/openshift/api/security/v1:go_default_library",
        "//vendor/k8s.io/api/admissionregistration/v1:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/client-go/util/jsonpath:go_default_library",
    ],
)
